<?php

namespace App\Http\Middleware;

use Closure;

class LoginMiddleWare
{
    /**
     * Handle an incoming request.
     *
     * @param  \Illuminate\Http\Request  $request
     * @param  \Closure  $next
     * @return mixed
     */
    public function handle($request, Closure $next)
    {
	
			
		echo '$$$$$$$$$$$$执行中间件';
        //dd($request);
		
		if(!$request->has('isLogin')){
			//跳转到指定页面
			return redirect('/home/index');
		}else{
		
			return $next($request);
			
		}

    }
	
}
